package com.twu.biblioteca;

import org.junit.Test;

import static org.junit.Assert.assertEquals;

/**
 * Created by michaelbottjer on 21/04/2014.
 */
public class MovieTest {

    Movie movie = new Movie("Wolf of Wall Street", "Martin Scorsese", 2013);

    @Test
    public void isInitialisedWithName(){
        assertEquals("Wolf of Wall Street", movie.getTitle());
    }

    @Test
    public void isInitialisedWithDirector(){
        assertEquals("Martin Scorsese", movie.getDirector());
    }

    @Test
    public void isInitialisedWithYear(){
        assertEquals(2013, movie.getYear());
    }

    @Test
    public void isInitialisedWithDefaultRatingUnrated(){
        assertEquals("unrated", movie.getRating());
    }

    @Test
    public void canBeInitialisedWithRating(){
        Movie movie = new Movie("Wolf of Wall Street", "Martin Scorsese", 2013, "3");
        assertEquals("3", movie.getRating());
    }

}
